JSP Interview Questions and Answers
JSF vs JSP | JSP vs Servlets | JSP vs ASP |
Ques 1. What is JSP Compiler and where are compiled JSP Java files?
JSP are automatically compiled at runtime.
The compiled JSP files are by default available in the /work folder of the Tomcat environment. There should be a subfolder Catalina which in turn has a subfolder representing the domain name which defaults to localhost. There in turn should be the project folder which in turn contains package hierarchy org.apache.jsp with therein the compiled JSP files.
Ques 2. Is JSP technology extensible?
YES. JSP technology is extensible through the development of custom actions, or tags, which are encapsulated in tag libraries.
Ques 3. What is the ResourceBundle class in JSP?
The ResourceBundle class is used to store locale-specific resources that can be loaded by a program to tailor the program's appearance to the particular locale in which it is being run.
Ques 4. What is the difference between a Scrollbar and a ScrollPane in JSP?
A Scrollbar is a Component, but not a Container. A ScrollPane is a Container. A ScrollPane handles its own events and performs its own scrolling.
Ques 5. What is a Java package and how is it used?
A Java package is a naming context for classes and interfaces. A package is used to create a separate namespace for groups of classes and interfaces. Packages are also used to organize related classes and interfaces into a single API unit and to control accessibility to these classes and interfaces.